package main.dataManager;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import main.data.Centroid;
import main.data.DataPoint;
import main.data.Membership;
import de.gugubarra.core.nop.Nop;
import de.gugubarra.core.nop.Topic;
import de.gugubarra.core.nop.User;

public class DataManagerSimpleImpl implements DataManager {

	private List<User> userList;
	private int numberOfUser = 1000;
	
	private List<Topic> topicList;
	private int numberOfTopic=10;
	
	private List<Nop> nopList;
	
	private List<Centroid> centroidsList;
	private int numberOfCluster = 10;
	
	private Membership membership;
	private Map<Centroid, Nop> cluster;
	private Map<Nop, Double> membershipOfDataPoint;
	
	public void initializeData(){
		userList = new ArrayList();
		for(int i=0;i<numberOfCluster;i++){
			User aUser = new User();
			aUser.setId(i);
			aUser.setName("User-"+i);
			userList.add(aUser);
		}
		nopList = new ArrayList();
		for(int i=0; i<numberOfUser;i++){
			Nop aNop=new Nop();
			aNop.setOwner(userList.get(i));
			nopList.add(aNop);
		}
		centroidsList =new ArrayList();
	}
	
	@Override
	public void addCluster(Centroid newCentroid) {
		// TODO Auto-generated method stub
		centroidsList.add(newCentroid);
	}

	@Override
	public Centroid getCentroidByIndex(int indexOfCentroid) {
		// TODO Auto-generated method stub
		return this.centroidsList.get(indexOfCentroid);
	}

	@Override
	public Membership getMembership(DataPoint dataPoint, Centroid centroid) {
		// TODO Auto-generated method stub
		return null;
	}
	
	
	@Override
	public Nop getNopByIndex(int indexOfNop) {
		// TODO Auto-generated method stub
		return this.nopList.get(indexOfNop);
	}

	@Override
	public List<Topic> getTopicList() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public User getUserByIndex(int indexOfUser) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void mergeClusters(Centroid firstCentroid, Centroid secondCentroid) {
		// TODO Auto-generated method stub

	}

	@Override
	public void setCentroidByIndex() {
		// TODO Auto-generated method stub

	}

	@Override
	public void setMembership(DataPoint dataPoint, Centroid centroid) {
		// TODO Auto-generated method stub

	}

}
